package card;

import PJ.Entrance;
import PJ.Player;
import place.Landindex;

public class MonsterCard extends CardSystem {
	//怪兽卡
	String name="MonsterCard";
	String function="该街道所有土地重置为初始状态，即1级";	
	String type="MagicCard";
	String range="停留地的整条街道";
	MonsterCard(){
		int point=20;
		this.point=point;
	}	
	@Override
	public String getName() {
		
		return name;
	}

	@Override
	public String getFunction() {
		// TODO Auto-generated method stub
		return function;
	}
	@Override
	public int getPoint() {
		return point;
	}
	@Override
	public String getType() {
		// TODO Auto-generated method stub
		return type;
}

	@Override
	public String getRange() {
		// TODO Auto-generated method stub
		return range;
	}
	@Override
	public void print(int location, int who) {
		// TODO Auto-generated method stub
		Player playerow=new Player();
		for(int i=0;i<Entrance.players.size();i++){
			if(Entrance.players.get(i).getNamei()==Landindex.mark[location].owner){
				playerow=Entrance.players.get(i);
			}
		}
		Landindex.mark[location].level=1;
		playerow.setHouseValue(playerow.getHouseValue()-Landindex.mark[location].price+Landindex.mark[location].intialprice);
		Landindex.mark[location].price=Landindex.mark[location].intialprice;
	}
}